package com.loop.ddz;

import java.util.List;

/**
 * 玩家类
 */
public class Player {
    //玩家姓名
    private String name;
    //玩家角色（0为农民，1为地主）
    private Integer type;
    //玩家手持的牌
    private List<Poker> pokerList;

    public Player() {
    }

    public Player(String name, Integer type, List<Poker> pokerList) {
        this.name = name;
        this.type = type;
        this.pokerList = pokerList;
    }

    public Player(String name, List<Poker> pokerList) {
        this.name = name;
        this.pokerList = pokerList;
    }

    @Override
    public String toString() {
        String sf = type == 0?"农民":"地主";
        return "玩家"+name+"身份是"+sf+",所持的牌是"+pokerList;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<Poker> getPokerList() {
        return pokerList;
    }

    public void setPokerList(List<Poker> pokerList) {
        this.pokerList = pokerList;
    }
}
